﻿#region License
// /* **************************************************************
// * Copyright (C) intex Consulting GmbH - All Rights Reserved    *
// *--------------------------------------------------------------*
// * Unauthorized copying of this file, via any medium is         *
// * strictly prohibited                                          *
// *--------------------------------------------------------------*
// * Proprietary and confidential                                 *
// *--------------------------------------------------------------*
// * Dissasembling/modifications strictly prohibited!             *
// ***************************************************************/
#endregion

using System;
using System.Diagnostics.CodeAnalysis;
using ComHlp.enums;

namespace ComHlp.ContentClasses.VirtualControls
{
    [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
    [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
    public class ItxRectangle : ICloneable
    {
        public ItxRectangleType RectangleType { get; set; }

        /// <summary> start x-coordinate </summary>
        public int StartX { get; set; }

        /// <summary> start y-coordinate </summary>
        public int StartY { get; set; }

        /// <summary> end x-coordinate </summary>
        public int EndX { get; set; }

        /// <summary> end y-coordinate </summary>
        public int EndY { get; set; }

        /// <summary> color number to use </summary>
        public int ColorNo { get; set; }

        public string RgbColorString { get; set; }

        /// <summary> border type to use 
        /// 1=einfach, 1W=einfach white, 2=zweifach, 2+ =zweifach hoch, 2- =zweifach tief, usw.</summary>
        public string BorderType { get; set; }

        // up from protocol revision 01
        public string Gradient { get; set; }

        /// <summary> fixed or movable ? </summary>
        public bool IsFixed { get; set; }

        /// <summary> rectangle is dummy - no positions received </summary>
        public bool IsDummyRectangle { get; set; }


        /// <summary> Default constructor </summary>
        public ItxRectangle(ItxRectangleType rectangleType)
        {
            RectangleType = rectangleType;
            Gradient = "";
            BorderType = "";
        }

        object ICloneable.Clone() { return Clone(); }

        public ItxRectangle Clone()
        {   
            return MemberwiseClone() as ItxRectangle;
        }
    }
}
